package org.ctstudio.oa.duty.dao;

import java.time.LocalDate;
import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.ctstudio.oa.duty.bean.DutyQuery;
import org.ctstudio.oa.duty.bean.DutyRecord;
import org.ctstudio.oa.duty.bean.DutySummary;

@Mapper
public interface DutyRecordsMapper {
  int add(DutyRecord r);

  DutyRecord get(LocalDate signDate, String uid);

  int editSignTime(DutyRecord r);

  long count(DutyQuery query);

  List<DutyRecord> query(DutyQuery query);

  long countWorkTime(DutyQuery query);

  List<DutySummary> queryWorkTime(DutyQuery query);

  long countOverTime(DutyQuery query);

  List<DutySummary> queryOverTime(DutyQuery query);

  DutyRecord fromSignRecord(LocalDate signDate, String uid);

  List<DutyRecord> getNeedUpgrade();

}
